// import Vue from 'vue'
import SvgIcon from '../components/SvgIcon/index.vue'// svg component

// register globally
Vue.component('svg-icon', SvgIcon)

export default{
  install (app) {
  // 此处形参为main.js文件中use()方法自动传进来的Vue实例
      app.component('SvgIcon', SvgIcon)
  }
}

// const req = require.context('./svg', false, /\.svg$/)

import req from('./svg')
const requireAll = requireContext => requireContext.keys().map(requireContext)
requireAll(req)
